package com.httpDemo.doMain;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import lombok.Data;

/**
 * application.properties配置文件的配置类
 * 使用@Component注解可将该类注入到ioc容器中，使用@ConfigurationProperties注解
 * 可获取ioc容器里配置文件中以prefix为前缀的常量。
 * 
 * @author Administrator
 *
 */
@Component
@ConfigurationProperties(prefix = "person")
@Data
public class Person {

	private Integer id;
	private String name;
	private String userName;
	private Integer age;
	private String[] hobby;
	private List<String> lists;
	private Map<String, String> maps;
	private Set<String> sets;
	private Date birth;

}
